import java.util.Scanner;

// Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        while (!s.equals("stop"))
        {
            String up = s.toUpperCase();
            String low = s.toLowerCase();
            System.out.println(s.toUpperCase());
            System.out.println(s.toLowerCase());
            System.out.println(up.concat(low));
            s = scanner.nextLine();
        }
    }
}